<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>创建驴友队</title>

    <script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>
    <script type="text/javascript">
        function upfile(){
            $.ajax({
                url:"/file",
                type:"post",
                data:new FormData($("#createTeam")[0]),
                processData:false,
                contentType:false,
                cache: false,
                dataType:"json",
                success:function(data){
                    console.log(data)
                },
                error:function(data){
                    console.log(data)
                }
            })
        }

    </script>
</head>
<body>
<form  method="post" action="/addTeam" th:action="@{/addTeam}" id="createTeam">
    队伍LOG<input type="file" name="TeamLog">
    <input type="button" onclick="upfile()" value="上传"/><br/>
    队名<input type="text" name="teamName"><br/>
    主打项目<input type="text" name="mainProject">
    简介<input type="text" name="intro"><br/>
    负责人<input type="text" name="principalName"><br/>
    负责人联系电话<input type="text" name="principalTelphone"><br/>
    宣言<input type="text" name="manifesto"><br/>
    <input type="submit" value="创建驴友队"><br/>

</form>


</body>
</html>